        page
******************************************************
** Copyright 2007 CMI Productions.                  **
** Lots of rights reserved.                         **
** Free for personal use as long as this copyright  **
** message is maintained in the source and the LCD  **
** copyright message is also preserved.  Commercial **
** use prohibited without CMIs written concent.     **
******************************************************

Radial Clock LED refresh Sequencing

Writes are broken up into eight rows refreshed sequentially.
Each row should be lit for approximately 1ms.
Each row can have up to 80 LEDs (columns).
Writing the column values consists of 16 writes
  Eight 2-bit writes for the LED rings on D1 and D0.
  Eight 8-bit writes for the LED matrix.

I first list the the exact writes for the first two rows
Then I show the memory organization.

Row 1:
  Write  1, D0 = C65, 00-seconds, D1 = C66, 01 seconds, rest = don't care
  Write  2, D0 = C67, 02-seconds, D1 = C68, 03 seconds, rest = don't care
  Write  3, D0 = C69, 04-seconds, D1 = C70, 05 seconds, rest = don't care
  Write  4, D0 = C71, 06-seconds, D1 = C72, 07 seconds, rest = don't care

  Write  5, D0 = C73, DH0 12 tick,  D1 = C74, DH1 12:00  , rest = don't care
  Write  6, D0 = C75, DH2 12:15  ,  D1 = C76, DH3 12:30  , rest = don't care
  Write  7, D0 = C77, DH4 12:45  ,  D1 = C78, DH5  1 tick, rest = don't care
  Write  8, D0 = C79, DH6  1:00  ,  D1 = C80, DH7  1:15  , rest = don't care

  Write  9, D0-D7 = C01-C08, Matrix Row  1, LEDs  1- 8 (D0=left-most)
  Write 10, D0-D7 = C09-C16, Matrix Row  1, LEDs  9-16 (D0=left-most)
  Write 11, D0-D7 = C17-C24, Matrix Row  1, LEDs 17-24 (D0=left-most)
  Write 12, D0-D5 = C25-C30, Matrix Row  1, LEDs 25-30 (D0=left-most) D6-D7 Unused

  Write 13, D0-D7 = C33-C40, Matrix Row  9, LEDs  1- 8 (D0=left-most)
  Write 14, D0-D7 = C41-C48, Matrix Row  9, LEDs  9-16 (D0=left-most)
  Write 15, D0-D7 = C49-C56, Matrix Row  9, LEDs 17-24 (D0=left-most)
  Write 16, D0-D5 = C57-C62, Matrix Row  9, LEDs 25-30 (D0=left-most) D6-D7 Unused

Row 2:
  Write  1, D0 = C65, 08-seconds, D1 = C66, 09 seconds, rest = don't care
  Write  2, D0 = C67, 10-seconds, D1 = C68, 11 seconds, rest = don't care
  Write  3, D0 = C69, 12-seconds, D1 = C70, 13 seconds, rest = don't care
  Write  4, D0 = C71, 14-seconds, D1 = C72, 15 seconds, rest = don't care
                      
  Write  5, D0 = C73, DH0  1:30  ,  D1 = C74, DH1  1:45  , rest = don't care
  Write  6, D0 = C75, DH2  2 tick,  D1 = C76, DH3  2:00  , rest = don't care
  Write  7, D0 = C77, DH4  2:15  ,  D1 = C78, DH5  2:30  , rest = don't care
  Write  8, D0 = C79, DH6  2:45  ,  D1 = C80, DH7  3 tick, rest = don't care

  Write  9, D0-D7 = C01-C08, Matrix Row  2, LEDs  1- 8 (D0=left-most)
  Write 10, D0-D7 = C09-C16, Matrix Row  2, LEDs  9-16 (D0=left-most)
  Write 11, D0-D7 = C17-C24, Matrix Row  2, LEDs 17-24 (D0=left-most)
  Write 12, D0-D5 = C25-C30, Matrix Row  2, LEDs 25-30 (D0=left-most) D6-D7 Unused

  Write 13, D0-D7 = C33-C40, Matrix Row 10, LEDs  1- 8 (D0=left-most)
  Write 14, D0-D7 = C41-C48, Matrix Row 10, LEDs  9-16 (D0=left-most)
  Write 15, D0-D7 = C49-C56, Matrix Row 10, LEDs 17-24 (D0=left-most)
  Write 16, D0-D5 = C57-C62, Matrix Row 10, LEDs 25-30 (D0=left-most) D6-D7 Unused

etcetera...

MEMORY ORGANIZATION - CLKMTX

This is the memory structure for the concentric rings of LEDs.  First
eight bytes are for the 60 outer LEDs that represent seconds and
minutes.  The second eight bytes are the for the inner row(s) of LEDs
for the hours and tick marks.

CLKMTX+00 D0=00 seconds, D1=01 seconds ... D7=07 seconds
CLKMTX+01 D0=08 seconds, D1=09 seconds ... D7=15 seconds
CLKMTX+02 D0=16 seconds, D1=17 seconds ... D7=23 seconds
CLKMTX+03 D0=24 seconds, D1=25 seconds ... D7=31 seconds

CLKMTX+04 D0=32 seconds, D1=33 seconds ... D7=39 seconds
CLKMTX+05 D0=40 seconds, D1=41 seconds ... D7=47 seconds
CLKMTX+06 D0=48 seconds, D1=49 seconds ... D7=55 seconds
CLKMTX+07 D0=56 seconds, D1=57 seconds ... D3=59 seconds
          D4-D7 unused

CLKMTX+08 D0=12 tick, D1=12:00,   D2=12:15,   D3=12:30
          D4=12:45,   D5= 1 tick, D6= 1:00,   D7= 1:15
CLKMTX+09 D0= 1:30,   D1= 1:45,   D2= 2 tick, D3= 2:00
          D4= 2:15,   D5= 2:30,   D6= 2:45,   D7= 3 tick
CLKMTX+10 D0= 3:00,   D1= 3:15,   D2= 3:30,   D3= 3:45
          D4= 4 tick, D5= 4:00,   D6= 4:15,   D7= 4:30
CLKMTX+11 D0= 4:45,   D1= 5 tick, D2= 5:00,   D3= 5:15
          D4= 5:30,   D5= 5:45,   D6= 6 tick, D7= 6:00

CLKMTX+12 D0= 6:15,   D1= 6:30,   D2= 6:45,   D3= 7 tick
          D4= 7:00,   D5= 7:15,   D6= 7:30,   D7= 7:45
CLKMTX+13 D0= 8 tick, D1= 8:00,   D2= 8:15,   D3= 8:30
          D4= 8:45,   D5= 9 tick, D6= 9:00,   D7= 9:15
CLKMTX+14 D0= 9:30,   D1= 9:45,   D2=10 tick, D3=10:00
          D4=10:15,   D5=10:30,   D6=10:45,   D7=11 tick
CLKMTX+15 D0=11:00,   D1=11:15,   D2=11:30,   D3=11:45
          D4= Unused, D5= Unused, D6= Unused, D7= Unused

MEMORY ORGANIZATION - DSPMTX


DSPMTX+00 through DSPMTX+03 Row  1, LSBs to the left (last 2 bits unused)
DSPMTX+04 through DSPMTX+07 Row  2, LSBs to the left (last 2 bits unused)
DSPMTX+08 through DSPMTX+11 Row  3, LSBs to the left (last 2 bits unused)
DSPMTX+12 through DSPMTX+15 Row  4, LSBs to the left (last 2 bits unused)
DSPMTX+16 through DSPMTX+19 Row  5, LSBs to the left (last 2 bits unused)
DSPMTX+20 through DSPMTX+23 Row  6, LSBs to the left (last 2 bits unused)
DSPMTX+24 through DSPMTX+27 Row  7, LSBs to the left (last 2 bits unused)
DSPMTX+28 through DSPMTX+31 Row  8, LSBs to the left (last 2 bits unused)

DSPMTX+32 through DSPMTX+35 Row  9, LSBs to the left (last 2 bits unused)
DSPMTX+36 through DSPMTX+39 Row 10, LSBs to the left (last 2 bits unused)
DSPMTX+40 through DSPMTX+43 Row 11, LSBs to the left (last 2 bits unused)
DSPMTX+44 through DSPMTX+47 Row 12, LSBs to the left (last 2 bits unused)
DSPMTX+48 through DSPMTX+51 Row 13, LSBs to the left (last 2 bits unused)
DSPMTX+52 through DSPMTX+55 Row 14, LSBs to the left (last 2 bits unused)
DSPMTX+56 through DSPMTX+59 Row 15, LSBs to the left (last 2 bits unused)
DSPMTX+60 through DSPMTX+63 Row 16, LSBs to the left (last 2 bits unused)

